package com.chanzany.composite;

import java.util.HashMap;

public class Main {
    public static void main(String[] args) {
        HashMap<Integer, String> map = new HashMap<>();
        map.put(0,"西游记");   //直接存放叶子节点
        HashMap<Integer, String> tmpMap = new HashMap<>();
        tmpMap.put(1,"水浒传");
        tmpMap.put(2,"红楼梦");
        tmpMap.put(4,"三国演艺");
        map.putAll(tmpMap);   //存放树枝节点
        System.out.println(map);
    }
}
